/**
 * Created by Administrator on 2017/7/20.
 */

const htmlwebpackplugin=require('html-webpack-plugin');
console.log(__dirname);
module.exports={
    entry:__dirname+'/src/main.js',  //入口路径
    output:{
        path:__dirname+'/dist', //出口绝对路径
        filename:'bulic.js'
    },
    module:{
        rules:[
            {
                test:/\.vue$/,
                use:'vue-loader'
            },
            {
                test:/\.css$/,
                use:['style-loader','css-loader']
            },
            {
                test:/\.(jpg|jpeg|png|ttf)$/,
                use:'url-loader'
            },
            {
                test:/\.js$/,
                use:'babel-loader',
                exclude:/node_modules/
            }
        ],
    },
    plugins:[
        new htmlwebpackplugin({
            template:__dirname+'/src/index.html',  //src里的index.html文件
            filename:'index.html'

        })
    ]

}